# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Justin Davis (juster) <jrcd83@gmail.com>

pkgname=perl-async-interrupt
pkgver=1.26
pkgrel=4
pkgdesc='allow C/XS libraries to interrupt perl asynchronously'
arch=(x86_64)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl-canary-stability' 'perl-common-sense')
url=https://metacpan.org/release/Async-Interrupt
source=("https://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Async-Interrupt-$pkgver.tar.gz")
sha512sums=('7fab1899e11064e1be292eb1c2e149278bfaab5087afcfa6898f9b6095278fa74ebab2114abd69ca0bfbd8028038cdd3df7953e14460c77194ccc7041b87f5c6')

build() {
  cd Async-Interrupt-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL
  make
}

check() {
  cd Async-Interrupt-$pkgver
  make test
}

package() {
  cd Async-Interrupt-$pkgver
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
